/*
 * CTDR_Strip.h
 *
 *  Created on: 22 d�c. 2010
 *      Author: Mathieu
 */

#ifndef CTDR_STRIP_H_
#define CTDR_STRIP_H_

#include "CTDR_Electrode.h"
#include "CTDR_Interaction.h"
#include "TGraph2D.h"
#include "TGraph.h"
#include "TH2D.h"
#include "TString.h"



class CTDR_Strip: public CTDR_Electrode {
public:
	CTDR_Strip();
	CTDR_Strip(double Lx,double Ly, double Lz,TString file);
	void SetV(double x, double y , double z);
    void AddData(CTDR_Interaction e, CTDR_Interaction h);
    void AddDataElectrons(CTDR_Interaction e, CTDR_Interaction h);
    void AddDataHoles(CTDR_Interaction e, CTDR_Interaction h);
    void SetV0(CTDR_Interaction e, CTDR_Interaction h);
    void Reset();
    void WriteData(int event,CTDR_Interaction e, CTDR_Interaction h);
    int GetLength(TString file);
    double GetQtot(){return Qtot;};

protected:

	TGraph *pulse_h;
	TGraph *pulse_e;
	TH2D *Ramo;
	double V_Ramo;
	double Qtot;
	vector<double> V_e;
	vector<double> V_h;
	vector<double> V_t;

	vector<double> t_h;
	vector<double> t_e;
	vector<double> t_t;

	int Le,Lh,Lt;
	double Vh0,Ve0;


};

#endif /* CTDR_STRIP_H_ */
